package com.ruoyi.mhrb.platform.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mhrb.platform.mapper.MhrbCarouselMapMapper;
import com.ruoyi.mhrb.platform.domain.MhrbCarouselMap;
import com.ruoyi.mhrb.platform.service.IMhrbCarouselMapService;

/**
 * 轮播图配置Service业务层处理
 *
 * @author jhrb
 * @date 2024-11-25
 */
@Service
public class MhrbCarouselMapServiceImpl implements IMhrbCarouselMapService
{
    @Autowired
    private MhrbCarouselMapMapper mhrbCarouselMapMapper;

    /**
     * 查询轮播图配置
     *
     * @param mapId 轮播图配置主键
     * @return 轮播图配置
     */
    @Override
    public MhrbCarouselMap selectMhrbCarouselMapByMapId(Long mapId)
    {
        return mhrbCarouselMapMapper.selectMhrbCarouselMapByMapId(mapId);
    }

    /**
     * 查询轮播图配置列表
     *
     * @param mhrbCarouselMap 轮播图配置
     * @return 轮播图配置
     */
    @Override
    public List<MhrbCarouselMap> selectMhrbCarouselMapList(MhrbCarouselMap mhrbCarouselMap)
    {
        return mhrbCarouselMapMapper.selectMhrbCarouselMapList(mhrbCarouselMap);
    }

    /**
     * 新增轮播图配置
     *
     * @param mhrbCarouselMap 轮播图配置
     * @return 结果
     */
    @Override
    public int insertMhrbCarouselMap(MhrbCarouselMap mhrbCarouselMap)
    {
        return mhrbCarouselMapMapper.insertMhrbCarouselMap(mhrbCarouselMap);
    }

    /**
     * 修改轮播图配置
     *
     * @param mhrbCarouselMap 轮播图配置
     * @return 结果
     */
    @Override
    public int updateMhrbCarouselMap(MhrbCarouselMap mhrbCarouselMap)
    {
        return mhrbCarouselMapMapper.updateMhrbCarouselMap(mhrbCarouselMap);
    }

    /**
     * 批量删除轮播图配置
     *
     * @param mapIds 需要删除的轮播图配置主键
     * @return 结果
     */
    @Override
    public int deleteMhrbCarouselMapByMapIds(Long[] mapIds)
    {
        return mhrbCarouselMapMapper.deleteMhrbCarouselMapByMapIds(mapIds);
    }

    /**
     * 删除轮播图配置信息
     *
     * @param mapId 轮播图配置主键
     * @return 结果
     */
    @Override
    public int deleteMhrbCarouselMapByMapId(Long mapId)
    {
        return mhrbCarouselMapMapper.deleteMhrbCarouselMapByMapId(mapId);
    }
}
